Add clear pending interrupt feature with new clearPendingInterrupt API#1258
Add clear pending interrupt feature with new clearPendingInterrupt API#1258cparata wants to merge 2 commits intostm32duino:mainfrom
Conversation
|
For ref #1168 |
|
Hi @cparata, |
|
Hi @ABOSTM , |
|
My only concern about the usage of LL HAL is portability. It is not said that LL HAL is available for all STM32 families; this is the reason why I suggested the usage of the HAL_DeInit that instead should be available for all STM32 families. |
|
Hi all, |
|
I was able to test the new PR with the motor driver and it works as expected on my side. So, for me this implementation is functional. |
ABOSTM
left a comment
There was a problem hiding this comment.
Hi Carlo,
Thanks for this PR,
I feel like this is quite heavy to simply disable exti.
I wonder whether we could make that simpler:
- either with LL, using directly LL_EXTI_DisableIT_0_31()
- or with HAL, using HAL_EXTI_GetConfigLine(), changing EXTI mode to EXTI_MODE_NONE and HAL_EXTI_SetConfigLine()
Note: this way we keep pin configuration (no resore of default input mode) and simply disable exti.
What do you think ?
|
Hi @ABOSTM , |
|
Hi guys, I was meeting troubles with a STM32L072 just trying to use interrupt with a button generating some rebonds and I found this PR. I applied modifications but it's not enough for me. I had to add __HAL_GPIO_EXTI_CLEAR_IT() in order to get the expected behaviour. My (working) code : If __HAL_GPIO_EXTI_CLEAR_IT(butPpin); is commented, I get an extra interrupt |
|
Hi @battosai30 , Let me know if it works on your side. |
|
Thanks for your reply :) Yeah it could be a solution but as I'm designing a very low power device, spend 100ms just for debounce is a pretty big waste ... And it's not the behaviour you usually get in Arduino environnement so ... |
|
I close this one as it is superseded bu #1602 |
Hi Frederic,
I reopened this PR referring on the new branch that I created on my fork to test it in a clean way.
Best Regards,
Carlo